import request from '@/utils/request'

export function getList(data: any) {
  return request({
    url: '/Wms_Item/GetList',
    method: 'post',
    data,
  })
}
export function getTreeList(data: any) {
  return request({
    url: '/Wms_Item_Category/TreeGridListJson',
    method: 'post',
    data,
  })
}
export function getFlieList(data: any) {
  return request({
    url: '/WF_Document/GetList',
    method: 'post',
    data,
  })
}
export function delDoc(data: any) {
  return request({
    url: '/WF_Document/deldoc',
    method: 'post',
    data,
  })
}
export function getPageData(data: any) {
  return request({
    url: '/Wms_Item/GetPageData',
    method: 'post',
    data,
  })
}

export function doEdit(data: any) {
  return request({
    url: '/Wms_Item/save',
    method: 'post',
    data,
  })
}
export function gets(data: any) {
  return request({
    url: '/Wms_Item/GetS',
    method: 'post',
    data,
  })
}
export function doDelete(data: any) {
  return request({
    url: '/Wms_Item/dels',
    method: 'post',
    data,
  })
}

// 物资表下载

export function Wms_itemDown(data: any) {
  return request({
    url: '/Wms_Item/DownLoadTemplate',
    method: 'get',
    headers: { 'Content-Type': 'application/json; application/octet-stream' },
    responseType: 'arraybuffer',
  })
}

// 物资表导出

export function Wms_itemExport(data: any) {
  return request({
    url: '/Wms_Item/Export',
    method: 'post',
    headers: { 'Content-Type': 'application/json; application/octet-stream' },
    responseType: 'arraybuffer',
    data,
  })
}

export function GetPageDataPubItem(data: any) {
  return request({
    url: '/WF_Document/GetPageDataPubItem',
    method: 'post',
    data,
  })
}

export function ItemBindFile(data: any) {
  return request({
    url: '/Wms_Item/ItemBindFile',
    method: 'post',
    data,
  })
}

export function BaseGetPageData(data: any) {
  return request({
    // url: '/Base_Department/TreeGridListJson',
    url: '/Base_Department/GetPageData',
    method: 'post',
    data,
  })
}

export function GetPageDataVisit(data: any) {
  return request({
    // url: '/Base_Department/TreeGridListJson',
    url: '/Base_Department/GetPageDataVisit',
    method: 'post',
    data,
  })
}
export function savestock(data: any) {
  return request({
    // url: '/Base_Department/TreeGridListJson',
    url: '/Wms_ItemStock/savestock',
    method: 'post',
    data,
  })
}

// 物资档案信息列表
export function wms_itemData(data: any) {
  return request({
    url: '/Wms_All_Item/GetPageData',
    method: 'post',
    data,
  })
}

// 物资档案详情
export function GetItem(data: any) {
  return request({
    url: '/Wms_All_Item/GetItem',
    method: 'post',
    data,
  })
}

// 物资档案对应保存
export function SaveAll(data: any) {
  return request({
    url: '/Wms_All_Item/Save',
    method: 'post',
    data,
  })
}


// 删除物资对应
export function DelItem(data: any) {
  return request({
    url: '/Wms_All_Item/DelItem',
    method: 'post',
    data,
  })
}

// 批量删除物资对应
export function BatchDelItem(data: any) {
  return request({
    url: '/Wms_All_Item/BatchDelItem',
    method: 'post',
    data,
  })
}

// 物资对应导出

export function Wms_All_ItemExport(data: any) {
  return request({
    url: '/Wms_All_Item/Export',
    method: 'post',
    headers: { 'Content-Type': 'application/json; application/octet-stream' },
    responseType: 'arraybuffer',
    data,
  })
}

// 清洗单位
export function SelAllItemWHUnit(data: any) {
  return request({
    url: '/Wms_All_Item/Sel_AllItemWHUnit',
    method: 'post',
    data,
  })
}

// 删除图片
export function deletemarkdoc(data: any) {
  return request({
    url: '/WF_Document/deletemarkdoc',
    method: 'post',
    data,
  })
}

// 删除时间区间
export function DateDelAllItem(data: any) {
  return request({
    url: '/Wms_All_Item/DateDelAllItem',
    method: 'post',
    data,
  })
}




